package com.jh.paymentchannel.helipay.service;

import java.io.IOException;
import java.util.HashMap;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.jnewsdk.util.StringUtils;
@Controller
@EnableAutoConfiguration
public class HeLiPayInfoPage {
	 
	private static final Logger LOG = LoggerFactory.getLogger(HeLiPayInfoPage.class);
	
	
	@RequestMapping(method=RequestMethod.GET,value="/v1.0/paymentchannel/topup/helipay")
	public  String returnpay(HttpServletRequest request, HttpServletResponse response, Model model)throws IOException {
		
		Map map = new HashMap();
		// 设置编码
		request.setCharacterEncoding("utf-8");
		response.setCharacterEncoding("utf-8");
		response.setContentType("text/html;charset=utf-8");
		String P2_customerNumber = request.getParameter("P2_customerNumber");
		String P3_bindId = request.getParameter("P3_bindId");
		String P4_userId = request.getParameter("P4_userId");
		String P5_orderId = request.getParameter("P5_orderId");
		String reqTime = request.getParameter("reqTime");
		String P8_orderAmount = request.getParameter("P8_orderAmount");
		String P9_phone = request.getParameter("P9_phone");
		String P9_goodsName = request.getParameter("P9_goodsName");
		String P13_orderIp = request.getParameter("P13_orderIp");
		LOG.info("接口/v1.0/paymentchannel/topup/kuaijie——@P2_customerNumber="+P2_customerNumber+"@P4_userId="+P4_userId+"@P5_orderId="+P5_orderId
				+"@reqTime="+reqTime+"@P8_orderAmount="+P8_orderAmount+"@P3_bindId="+P3_bindId
				+"@P9_phone="+P9_phone+"@P9_goodsName="+P9_goodsName+"@P13_orderIp="+P13_orderIp);
			model.addAttribute("P2_customerNumber",P2_customerNumber);
			model.addAttribute("P3_bindId", P3_bindId);
			model.addAttribute("P4_userId", P4_userId);
			model.addAttribute("P5_orderId", P5_orderId);
			model.addAttribute("reqTime", reqTime);
			model.addAttribute("P8_orderAmount", P8_orderAmount);
			model.addAttribute("P9_phone", P9_phone);
			model.addAttribute("P9_goodsName", P9_goodsName);
			model.addAttribute("P13_orderIp", P13_orderIp);
			model.addAttribute("P16_serverCallbackUrl", "http://47.104.158.3/v1.0/paymentchannel/topup/hl/notify_call");
			return "zhifu2";
		
	}
	
}
